package com.example.myapplication.fraction;

import com.example.baselib.base.BaseFraction;
import com.example.baselib.utils.UIUtils;
import com.example.baselib.widget.BGGImage;
import com.example.myapplication.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;

public class MyFraction extends BaseFraction {

    String[] imgs = {
            "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2F201308%2F12%2F161557ijw977lwa37t738j.jpg&refer=http%3A%2F%2Fattach.bbs.miui.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620465800&t=f5c3a45dd1b157f0ef144d48755059e2",
            "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2F201209%2F15%2F180430hxz7e1bcz7zg11c3.jpg&refer=http%3A%2F%2Fattach.bbs.miui.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620461133&t=57448a570092c966c200bab0b6f6f4c2"
    };
    private AbilitySlice mAbilitySlice;

    public MyFraction(AbilitySlice abilitySlice) {
        this.mAbilitySlice = abilitySlice;
    }

    @Override
    protected int getComponentUIResId() {
        return ResourceTable.Layout_fraction_my;
    }

    @Override
    protected void initComponent() {
        BGGImage image = UIUtils.findComponentFromId(mRootComponent, ResourceTable.Id_img);
        image.load(imgs[1], ResourceTable.Media_ic_launcher);

    }
}
